/*****************************************************************************//*!
* file  : test.c
* creat : apleilx
* data  : 2017/03/02
*******************************************************************************/
#define   osObjectsPublic                                       // define objects in rtxapp module
#include "osObjects.h"                                          // RTOS object definitions

void SysTaskEntry (void const *argument);                                     // thread function
osThreadDef (SysTask,SysTaskEntry, osPriorityAboveNormal, 0, 256);              // thread object


void mbTaskEntry (void const *argument);                                     // thread function
osThreadDef (MbTask,mbTaskEntry, osPriorityAboveNormal, 0, 256);              // thread object

void PidTaskEntry (void const *argument);                                     // thread function
osThreadDef (PidTask,PidTaskEntry, osPriorityAboveNormal, 0, 256);              // thread object

void TempTaskEntry (void const *argument);                                     // thread function
osThreadDef (TempTask,TempTaskEntry, osPriorityAboveNormal, 0, 256);              // thread object

/*----------------------------------------------------------------------------
 *      Thread 1 'Thread_Name': Sample thread
 *---------------------------------------------------------------------------*/

int Init_Thread (void)
{
 
    tid_SysTask = osThreadCreate(osThread(SysTask), NULL);
    if (!tid_SysTask) 
        return(-1);
    
    
    tid_MbTask = osThreadCreate(osThread(MbTask), NULL);
    if (!tid_MbTask) 
        return(-1);
    
    tid_PidTask = osThreadCreate(osThread(PidTask), NULL);
    if (!tid_PidTask) 
        return(-1);
    
    tid_TempTask = osThreadCreate(osThread(TempTask), NULL);
    if (!tid_TempTask) 
        return(-1);
    
    
    
  return(0);
}

